﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Exhibition.Dao.ViewModel;
using Exhibition.Service;

namespace Exhibition.UserCenter
{
    public partial class UserMain : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                UserModel usermodel = MembershipService.GetLoginUser();
                if (usermodel != null)
                {
                    if (usermodel.UserType == 2)
                    {
                        GetAttion(usermodel);
                    }
                }
            }
        }

        private void GetAttion(UserModel umd)
        {
           int ilike= CenterService.attentionService.GetLikeUser(umd.Id,Convert.ToInt32(umd.SiteID),1);
           int likei = CenterService.attentionService.GetLikeUser(umd.Id, Convert.ToInt32(umd.SiteID), 2);
           ltrilike.Text = ilike.ToString();
           ltrlikei.Text = likei.ToString();
        }
    }
}